Real-world analog signals such as temperature, pressure, sound, or images are routinely converted to a digital representation that can be easily processed in modern digital systems. In many systems, this digital information is converted back to an analog form to perform some real-world function. The circuits that perform this step are digital-to-analog converters (DACs), and their outputs are used to drive a variety of devices. Loudspeakers, video displays, motors, mechanical servos, radio frequency (RF) transmitters, and temperature controls are just a few diverse examples. DACs are often incorporated into digital systems in which real-world signals are digitized by analog-to-digital converters (ADCs), processed, and then converted back to analog form by DACs.
A DAC produces a quantized or discrete step analog output in response to a binary digital input code and the analog output is commonly a voltage or a current. To generate the output, a reference quantity, or level, (usually the aforementioned voltage or current) is divided into binary and/or linear fractions. Then the digital input drives switches that combine an appropriate number of these fractions to produce the output. The number and size of the fractions reflect the number of possible digital input codes, which is a function of converter resolution or the number of bits (n) in the input code. For n bits, there are 2n possible codes. The analog output of the DAC output is the digital fraction represented as the ratio of the digital input code divided by 2n (or 2n−1 depending on the specific definition used) times the analog reference value.